

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
<script type="text/javascript" src="helpman_topicinit.js"></script>

<title>Insert New State [Enterprise Architect User Guide]</title>

<meta name="keywords" content="Enterprise Architect, Sparx Systems, UML, State Machine Table,State Machine Table Add States,State Machine Table Add Substates,State Machine Table Remove Substate Parent Relation">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta http-equiv="Content-Style-Type" content="text/css" />

<link type="text/css" href="default.css" rel="stylesheet" />
<style type="text/css">
  A, A:Visited
  {
    color: #00F;
  }

  A:Active, A:Hover
  {
    color: #F00;
  }

  OL
  {
    margin: 5px 0 5px 48px;
  }

  UL
  {
    margin-bottom: 3px;
    margin-top: 0;
  }

  #nsr
  {
    background-color: #D4DFFF;
  }

  #nsr A
  {
    text-decoration: none;
  }

  #mainbody
  {
    padding: 8px;
  }

  .p_BodyText
  {
    padding: 5px 0;
  }
</style>



<style type="text/css" media="screen">
  BODY
  {
    background-color: #FFFFFF;
  }

  #nsr
  {
    padding: 6px 6px 0 6px;
    border-bottom: none;
    vertical-align: top;
    z-index: 2;
    visibility: visible;
    left: 0;
    top: 0;
    position: absolute;
  }

  #mainbody
  {
    left: 0;
    top: 0;
    margin: 0;
    position: absolute;
    padding: 10px;
    overflow: auto;
    height: 100%;
    z-index: 1;
    background-repeat: no-repeat;
    background-position: bottom right;
    background-attachment: fixed;
  }
</style>

<style type="text/css" media="print">
  #nsr
  {
    visibility: none;
  }

  #mainbody
  {
    overflow: visible;
  }
</style>
<script type="text/javascript" language="JavaScript" src="nonscroll.js"></script>

</head>
<body scroll="no">

<div id="page">



        <div id="content">
          <div id="content-inner">
          



  
          <div id="nsr">
            <table border="0" cellspacing="0" cellpadding="4" width="100%">
              <tr valign="top">
                <td align="left">
  


                  <p class="p_Heading1"><span class="f_Heading1">Insert New State</span></p>



  
                </td>
                <td align="right">
                  <a href="introduction.htm" onmouseover="document.images.main.src='button_main_h.gif'" onmouseout="document.images.main.src='button_main.gif'">
                    <img name="main" src="button_main.gif" border=0 alt="Return to Introduction">
                  </a>&nbsp;
    
                  <a href="change_state_table_size.htm" onmouseover="document.images.prev.src='button_prev_h.gif'" onmouseout="document.images.prev.src='button_prev.gif'">
                    <img name=prev src="button_prev.gif" border=0 alt="Previous page" />
                  </a>&nbsp;
    
    
    
                  <a href="insert_trigger.htm" onmouseover="document.images.next.src='button_next_h.gif'" onmouseout="document.images.next.src='button_next.gif'">
                    <img name=next src="button_next.gif" border=0 alt="Next page" />
                  </a>
    
    
                </td>
              </tr>
            </table>
          </div>
          <div id="mainbody">
  


                <p class="p_BodyText"><span class="f_BodyText">You can insert a new State in the State Machine table, using one of following methods:</span></p>
<ul style="text-indent: 0px; margin-left: 30px; list-style-position: outside;">
<li><span class="f_Bulletlist1">In the top left cell in the </span><span class="f_BodyText">State Machine table</span><span class="f_Bulletlist1">, move the cursor to the word </span><span class="f_MenuKeyField">State</span><span class="f_Bulletlist1"> to display a </span><span class="f_Bulletlist1" style="font-weight: bold;">+</span><span class="f_Bulletlist1"> at the end of the word; click on the </span><span class="f_Bulletlist1" style="font-weight: bold;">+</span><span class="f_Bulletlist1"> to create a new State</span></li>
<li><span class="f_Bulletlist1">Right-click in the top left cell in the </span><span class="f_BodyText">State Machine table</span><span class="f_Bulletlist1"> to display the context menu, and select the </span><span class="f_MenuKeyField">Add State</span><span class="f_Bulletlist1"> menu option</span></li>
<li><span class="f_Bulletlist1">Right-click on an existing State cell in the </span><span class="f_BodyText">State Machine table</span><span class="f_Bulletlist1"> to display the context menu, and select the</span></li>
</ul>
<ul style="text-indent: 0px; margin-left: 65px; list-style-position: outside;">
<li><span class="f_MenuKeyField">Insert New State Before</span><span class="f_Bulletlist3"> option to insert a new State before the current State, or</span></li>
<li><span class="f_MenuKeyField">Insert New State After</span><span class="f_Bulletlist3"> option to insert a new State after the current State</span></li>
</ul>
<ul style="text-indent: 0px; margin-left: 30px; list-style-position: outside;">
<li><span class="f_Bulletlist1">Click on an existing State cell in the </span><span class="f_BodyText">State Machine table</span><span class="f_Bulletlist1">, and press</span><span class="f_MenuKeyField"> [Insert]</span><span class="f_Bulletlist1"> to create and insert a new State above the selected State</span></li>
<li><span class="f_Bulletlist1">In the Enterprise Architect UML </span><span class="f_UIControl">Toolbox</span><span class="f_Bulletlist1">, on the </span><span class="f_UIControl">State Elements</span><span class="f_Bulletlist1"> page, click on an element and then click on:</span></li>
</ul>
<ul style="text-indent: 0px; margin-left: 65px; list-style-position: outside;">
<li><span class="f_Bulletlist3">the diagram background to add a new State to the end of the table, or</span></li>
<li><span class="f_Bulletlist3">an existing State cell to add the new State just above it.</span></li>
</ul>
<div style="text-align: left; text-indent: 0px; padding: 0px 0px 0px 0px; margin: 5px 0px 5px 13px;"><table cellspacing="0" cellpadding="2" border="0" style="border: none; border-spacing:0px;">
<tr style="text-align:left;vertical-align:bottom;">
<td valign="bottom" width="955" bgcolor="#efeff7" style="width:955px; background-color:#efeff7;"><p class="p_TiporNote" style="border-top: none; border-right: none; border-left: none;"><span class="f_TiporNote">Note:</span></p>
</td>
</tr>
<tr style="text-align:left;">
<td width="955" bgcolor="#f7f7ff" style="width:955px; background-color:#f7f7ff;"><p class="p_TiporNoteText"><span class="f_TiporNoteText">From the </span><span class="f_UIControl">State Elements</span><span class="f_TiporNoteText"> page of the Enterprise Architect UML </span><span class="f_UIControl">Toolbox</span><span class="f_TiporNoteText"> you can insert </span><span class="f_TiporNoteText" style="font-style: italic;">State, Initial, Final, Entry, Exit</span><span class="f_TiporNoteText"> and </span><span class="f_TiporNoteText" style="font-style: italic;">Terminate</span><span class="f_TiporNoteText"> elements.</span></p>
</td>
</tr>
</table>
</div>
<p class="p_SubHeadingL1"><span class="f_SubHeadingL1">Add a Substate</span></p>
<p class="p_BodyText"><span class="f_BodyText">To add a Substate to a selected State, follow the steps below:</span></p>
<ol style="text-indent: 0px; margin-left: 48px; list-style-position: outside;">
<li value=1><span class="f_NumberedList">Right-click on the required State cell in the </span><span class="f_BodyText">State Machine table</span><span class="f_NumberedList">. The context menu displays.</span></li>
<li value=2><span class="f_NumberedList">Select the </span><span class="f_MenuKeyField">Add Substate</span><span class="f_NumberedList"> menu option. Enterprise Architect adds the Substate to the State.</span></li>
</ol>
<div style="text-align: left; text-indent: 0px; padding: 0px 0px 0px 0px; margin: 5px 0px 5px 13px;"><table cellspacing="0" cellpadding="2" border="0" style="border: none; border-spacing:0px;">
<tr style="text-align:left;vertical-align:bottom;">
<td valign="bottom" width="955" bgcolor="#efeff7" style="width:955px; background-color:#efeff7;"><p class="p_TiporNote" style="border-top: none; border-right: none; border-left: none;"><span class="f_TiporNote">Note:</span></p>
</td>
</tr>
<tr style="text-align:left;">
<td width="955" bgcolor="#f7f7ff" style="width:955px; background-color:#f7f7ff;"><p class="p_TiporNoteText"><span class="f_TiporNoteText">If the selected State does not allow a Substate, then the </span><span class="f_MenuKeyField">Add Substate</span><span class="f_TiporNoteText"> menu option is grayed out.</span></p>
</td>
</tr>
</table>
</div>
<p class="p_BodyText"><span class="f_BodyText">You can also drag one existing State over another. If the second State allows Substates, the dragged State then becomes its Substate.</span></p>
<p class="p_BodyText"><span class="f_BodyText">Similarly, you can change the parent State of a Substate by dragging the Substate from the original parent State to a different State.</span></p>
<p class="p_SubHeadingL1"><span class="f_SubHeadingL1">Remove Parent Relation of a Substate</span></p>
<p class="p_BodyText"><span class="f_BodyText">To remove the parent relation of a Substate and make it a separate State, follow the steps below:</span></p>
<ol style="text-indent: 0px; margin-left: 48px; list-style-position: outside;">
<li value=1><span class="f_NumberedList">Right-click on the Substate in the </span><span class="f_BodyText">State Machine table</span><span class="f_NumberedList">. The context menu displays.</span></li>
<li value=2><span class="f_NumberedList">Select the </span><span class="f_MenuKeyField">Remove Parent Relation</span><span class="f_NumberedList"> menu option. The Substate cell becomes a State cell.</span></li>
</ol>
<p class="p_BodyText"><span class="f_BodyText">You can also drag and drop the Substate onto the top left cell of the State Machine table. The dragged Substate again becomes a State cell.</span></p>




            </div>
          </div>
        </div>



</div>


</body>
</html>
